#ifndef __COMMONHEADER_H__
#define __COMMONHEADER_H__

#if defined   __linux__

#define HANDLE  int
#define INVALID_HANDLE_VALUE -1

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <sys/stat.h>


#elif defined _WIN32 || defined _WIN64
#include <windows.h>
#include <tchar.h>
#else

#error "unsupported platform"

#endif

#include <stdio.h>
#include <queue>
#include <iostream>
#include <map>
#include <errno.h>
#include <string.h>

using namespace std;

struct Data
{
    char acData[50];
};
const int nMaxElementCount = 100000;
const int nMaxMappedFileSize = nMaxElementCount*sizeof(Data);
const int nNumberOfBytesToMap = nMaxMappedFileSize;
static const char szFileName[]="mapfile.bin"; // file for data sharing

#define DEV cout << "FILE " <<__FILE__ << " Line " << __LINE__ <<endl;

void DEBUGPrint();

#endif //__COMMONHEADER_H__
